@@ -6,7 +6,7 @@ from django_models_ext import BaseModelMixin, SexModelMixin |
||
6 | 6 |
from jsonfield import JSONField |
7 | 7 |
from shortuuidfield import ShortUUIDField |
8 | 8 |
|
9 |
-from pai2.basemodels import LensmanTypeBoolMixin, LensmanTypeMixin |
|
9 |
+from kodo.basemodels import LensmanTypeBoolMixin, LensmanTypeMixin |
|
10 | 10 |
|
11 | 11 |
|
12 | 12 |
class LensmanInfo(BaseModelMixin, LensmanTypeBoolMixin): |
@@ -167,8 +167,8 @@ urlpatterns += [ |
||
167 | 167 |
|
168 | 168 |
# 首页相关 |
169 | 169 |
urlpatterns += [ |
170 |
- url(r'^pai2/home$', group_views.pai2_home_api, name='pai2_home_api'), # 首页照片信息 |
|
171 |
- url(r'^pai2/tginfo$', tourguidegroup_views.pai2_tginfo_api, name='pai2_tginfo_api'), # 首页旅行团信息 |
|
170 |
+ url(r'^kodo/home$', group_views.kodo_home_api, name='kodo_home_api'), # 首页照片信息 |
|
171 |
+ url(r'^kodo/tginfo$', tourguidegroup_views.kodo_tginfo_api, name='kodo_tginfo_api'), # 首页旅行团信息 |
|
172 | 172 |
] |
173 | 173 |
|
174 | 174 |
# 服务器相关 |
@@ -11,7 +11,7 @@ from group.models import GroupPhotoInfo |
||
11 | 11 |
|
12 | 12 |
@logit |
13 | 13 |
def group_detail(request, group_id): |
14 |
- return render(request, 'page/pai2_user_{}_download.html'.format('ios' if request.iOS else 'adr'), {}) |
|
14 |
+ return render(request, 'page/kodo_user_{}_download.html'.format('ios' if request.iOS else 'adr'), {}) |
|
15 | 15 |
|
16 | 16 |
|
17 | 17 |
@logit |
@@ -22,9 +22,9 @@ def group_photo_detail(request, photo_id): |
||
22 | 22 |
|
23 | 23 |
@logit |
24 | 24 |
def tgu_group_detail(request, admin_id): |
25 |
- return render(request, 'page/pai2_tourguide_{}_download.html'.format('ios' if request.iOS else 'adr'), {}) |
|
25 |
+ return render(request, 'page/kodo_tourguide_{}_download.html'.format('ios' if request.iOS else 'adr'), {}) |
|
26 | 26 |
|
27 | 27 |
|
28 | 28 |
@logit |
29 | 29 |
def tgu_group_user_detail(request, admin_id): |
30 |
- return render(request, 'page/pai2_user_{}_download.html'.format('ios' if request.iOS else 'adr'), {}) |
|
30 |
+ return render(request, 'page/kodo_user_{}_download.html'.format('ios' if request.iOS else 'adr'), {}) |
@@ -6,8 +6,7 @@ from django_models_ext import BaseModelMixin |
||
6 | 6 |
from shortuuidfield import ShortUUIDField |
7 | 7 |
from TimeConvert import TimeConvert as tc |
8 | 8 |
|
9 |
-from pai2.basemodels import LensmanTypeMixin |
|
10 |
-from photo.models import PhotosInfo |
|
9 |
+from kodo.basemodels import LensmanTypeMixin |
|
11 | 10 |
from utils.qiniucdn import qiniu_file_url |
12 | 11 |
from utils.redis.rgroup import get_group_photo_thumbup_flag |
13 | 12 |
from utils.redis.rorder import get_lensman_order_record |
@@ -122,7 +122,7 @@ def tg_group_detail_api(request): |
||
122 | 122 |
|
123 | 123 |
|
124 | 124 |
@logit |
125 |
-def pai2_tginfo_api(request): |
|
125 |
+def kodo_tginfo_api(request): |
|
126 | 126 |
""" 首页旅行团信息 """ |
127 | 127 |
user_id = request.POST.get('user_id', '') |
128 | 128 |
|
@@ -608,7 +608,7 @@ def thumbup_cancel_api(request): |
||
608 | 608 |
|
609 | 609 |
|
610 | 610 |
@logit |
611 |
-def pai2_home_api(request): |
|
611 |
+def kodo_home_api(request): |
|
612 | 612 |
""" 首页照片信息 """ |
613 | 613 |
user_id = request.POST.get('user_id', '') |
614 | 614 |
page = int(request.POST.get('page', 1)) |
@@ -1,11 +1,11 @@ |
||
1 |
-# pai2_uwsgi.ini file |
|
1 |
+# kodo_uwsgi.ini file |
|
2 | 2 |
[uwsgi] |
3 | 3 |
|
4 | 4 |
# Django-related settings |
5 | 5 |
# the base directory (full path) |
6 |
-chdir = /home/paiai/work/pai2 |
|
6 |
+chdir = /home/paiai/work/kodo |
|
7 | 7 |
# Django's wsgi file |
8 |
-module = pai2.wsgi |
|
8 |
+module = kodo.wsgi |
|
9 | 9 |
# the virtualenv (full path) |
10 | 10 |
# home = /path/to/virtualenv |
11 | 11 |
|
@@ -15,7 +15,7 @@ master = true |
||
15 | 15 |
# maximum number of worker processes |
16 | 16 |
processes = 10 |
17 | 17 |
# the socket (use the full path to be safe |
18 |
-socket = /home/paiai/work/pai2/pai2/uwsgi/pai2.sock |
|
18 |
+socket = /home/paiai/work/kodo/kodo/uwsgi/kodo.sock |
|
19 | 19 |
# ... with appropriate permissions - may be needed |
20 | 20 |
chmod-socket = 777 |
21 | 21 |
# clear environment on exit |
@@ -0,0 +1,35 @@ |
||
1 |
+# kodo_nginx.conf |
|
2 |
+ |
|
3 |
+# the upstream component nginx needs to connect to |
|
4 |
+upstream kodo { |
|
5 |
+ # server unix:///home/paiai/work/kodo/kodo/uwsgi/kodo.sock; # for a file socket |
|
6 |
+ server 127.0.0.1:8888; # for a web port socket (we'll use this first) |
|
7 |
+} |
|
8 |
+ |
|
9 |
+# configuration of the server |
|
10 |
+server { |
|
11 |
+ # the port your site will be served on |
|
12 |
+ listen 80; |
|
13 |
+ # the domain name it will serve for |
|
14 |
+ server_name .kodo.xfoto.com.cn; # substitute your machine's IP address or FQDN |
|
15 |
+ charset utf-8; |
|
16 |
+ |
|
17 |
+ # max upload size |
|
18 |
+ client_max_body_size 75M; # adjust to taste |
|
19 |
+ |
|
20 |
+ # Django media |
|
21 |
+ location /media { |
|
22 |
+ alias /home/paiai/work/kodo/media; # your Django project's media files - amend as required |
|
23 |
+ } |
|
24 |
+ |
|
25 |
+ location /static { |
|
26 |
+ alias /home/paiai/work/kodo/collect_static; # your Django project's static files - amend as required |
|
27 |
+ } |
|
28 |
+ |
|
29 |
+ # Finally, send all non-media requests to the Django server. |
|
30 |
+ location / { |
|
31 |
+ # uwsgi_pass kodo; |
|
32 |
+ proxy_pass http://kodo; |
|
33 |
+ include /home/paiai/work/kodo/kodo/uwsgi/uwsgi_params; # the uwsgi_params file you installed |
|
34 |
+ } |
|
35 |
+} |
@@ -0,0 +1,12 @@ |
||
1 |
+[program:kodo] |
|
2 |
+command=/home/paiai/env/bin/uwsgi --ini /home/paiai/work/kodo/kodo/uwsgi/kodo.ini |
|
3 |
+autostart=true |
|
4 |
+autorestart=true |
|
5 |
+startretries=3 |
|
6 |
+exitcodes=0,1,2 |
|
7 |
+stopsignal=KILL |
|
8 |
+stopasgroup=true |
|
9 |
+killasgroup=true |
|
10 |
+stdout_logfile=/var/log/supervisor_kodo_access.log |
|
11 |
+stderr_logfile=/var/log/supervisor_kodo_error.log |
|
12 |
+user=paiai |
@@ -1,7 +1,7 @@ |
||
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
|
3 | 3 |
""" |
4 |
-Django settings for pai2 project. |
|
4 |
+Django settings for kodo project. |
|
5 | 5 |
|
6 | 6 |
Generated by 'django-admin startproject' using Django 1.8.4. |
7 | 7 |
|
@@ -83,11 +83,11 @@ MIDDLEWARE_CLASSES = ( |
||
83 | 83 |
# MIDDLEWARE_CLASSES += ('multidomain.middleware.DomainMiddleware', ) |
84 | 84 |
# |
85 | 85 |
# URL_CONFIG = ( |
86 |
-# # (r'^(.+\.)?xfoto\.com\.cn', 'pai2.urls_www'), |
|
87 |
-# (r'^(.+\.)?api\.pai\.ai', 'pai2.urls_api'), |
|
86 |
+# # (r'^(.+\.)?xfoto\.com\.cn', 'kodo.urls_www'), |
|
87 |
+# (r'^(.+\.)?api\.pai\.ai', 'kodo.urls_api'), |
|
88 | 88 |
# ) |
89 | 89 |
|
90 |
-ROOT_URLCONF = 'pai2.urls' |
|
90 |
+ROOT_URLCONF = 'kodo.urls' |
|
91 | 91 |
|
92 | 92 |
TEMPLATES = [ |
93 | 93 |
{ |
@@ -111,7 +111,7 @@ TEMPLATES = [ |
||
111 | 111 |
}, |
112 | 112 |
] |
113 | 113 |
|
114 |
-WSGI_APPLICATION = 'pai2.wsgi.application' |
|
114 |
+WSGI_APPLICATION = 'kodo.wsgi.application' |
|
115 | 115 |
|
116 | 116 |
|
117 | 117 |
# Database |
@@ -119,7 +119,7 @@ WSGI_APPLICATION = 'pai2.wsgi.application' |
||
119 | 119 |
|
120 | 120 |
DATABASES = { |
121 | 121 |
# Create Database |
122 |
- # CREATE DATABASE pai2 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; |
|
122 |
+ # CREATE DATABASE kodo DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; |
|
123 | 123 |
'default': { |
124 | 124 |
'ENGINE': 'django.db.backends.mysql', |
125 | 125 |
'NAME': 'kodo', |
@@ -254,7 +254,7 @@ CURTAIL_UUID_LENGTH = 7 # Used in django-curtail-uuid==1.0.0 |
||
254 | 254 |
|
255 | 255 |
# 水印设置 |
256 | 256 |
WATERMARK_OR_NOT = False # 水印是否开启 |
257 |
-WATERMARK_LOGO_PATH = os.path.join(PROJ_DIR, 'static/pai2/img/paiai_water_mark.png').replace('\\', '/') # 水印图片路径 |
|
257 |
+WATERMARK_LOGO_PATH = os.path.join(PROJ_DIR, 'static/kodo/img/paiai_water_mark.png').replace('\\', '/') # 水印图片路径 |
|
258 | 258 |
|
259 | 259 |
# 原图设置 |
260 | 260 |
LENSMAN_PHOTO_ORIGIN_EXPIRED_MSEL = 604800000 # 摄影师原图过期毫秒数,7d = 7 * 24 * 3600 * 1000msel |
@@ -271,14 +271,14 @@ PAI2_HOME_MAX_ROWS = 400 # 首页照片最大数量,PAI2_HOME_PER_PAGE * PAI2 |
||
271 | 271 |
# 下载页设置 |
272 | 272 |
TMPL_DOWNLOAD_PAGE_PATH = os.path.join(BASE_DIR, 'page/templates/page/download.tmpl.html').replace('\\', '/') |
273 | 273 |
|
274 |
-PAI2_USER_DOWNLOAD_ADR_PAGE_PATH = os.path.join(BASE_DIR, 'page/templates/page/pai2_user_adr_download.html').replace('\\', '/') |
|
275 |
-PAI2_USER_DOWNLOAD_IOS_PAGE_PATH = os.path.join(BASE_DIR, 'page/templates/page/pai2_user_ios_download.html').replace('\\', '/') |
|
274 |
+PAI2_USER_DOWNLOAD_ADR_PAGE_PATH = os.path.join(BASE_DIR, 'page/templates/page/kodo_user_adr_download.html').replace('\\', '/') |
|
275 |
+PAI2_USER_DOWNLOAD_IOS_PAGE_PATH = os.path.join(BASE_DIR, 'page/templates/page/kodo_user_ios_download.html').replace('\\', '/') |
|
276 | 276 |
|
277 |
-PAI2_LENSMAN_DOWNLOAD_ADR_PAGE_PATH = os.path.join(BASE_DIR, 'page/templates/page/pai2_lensman_adr_download.html').replace('\\', '/') |
|
278 |
-PAI2_LENSMAN_DOWNLOAD_IOS_PAGE_PATH = os.path.join(BASE_DIR, 'page/templates/page/pai2_lensman_ios_download.html').replace('\\', '/') |
|
277 |
+PAI2_LENSMAN_DOWNLOAD_ADR_PAGE_PATH = os.path.join(BASE_DIR, 'page/templates/page/kodo_lensman_adr_download.html').replace('\\', '/') |
|
278 |
+PAI2_LENSMAN_DOWNLOAD_IOS_PAGE_PATH = os.path.join(BASE_DIR, 'page/templates/page/kodo_lensman_ios_download.html').replace('\\', '/') |
|
279 | 279 |
|
280 |
-PAI2_TOURGUIDE_DOWNLOAD_ADR_PAGE_PATH = os.path.join(BASE_DIR, 'page/templates/page/pai2_tourguide_adr_download.html').replace('\\', '/') |
|
281 |
-PAI2_TOURGUIDE_DOWNLOAD_IOS_PAGE_PATH = os.path.join(BASE_DIR, 'page/templates/page/pai2_tourguide_ios_download.html').replace('\\', '/') |
|
280 |
+PAI2_TOURGUIDE_DOWNLOAD_ADR_PAGE_PATH = os.path.join(BASE_DIR, 'page/templates/page/kodo_tourguide_adr_download.html').replace('\\', '/') |
|
281 |
+PAI2_TOURGUIDE_DOWNLOAD_IOS_PAGE_PATH = os.path.join(BASE_DIR, 'page/templates/page/kodo_tourguide_ios_download.html').replace('\\', '/') |
|
282 | 282 |
|
283 | 283 |
# 下载设置 |
284 | 284 |
PAI2_USER_DOWNLOAD_WX_URL = 'https://a.app.qq.com/o/simple.jsp?pkgname=ai.pai.client' |
@@ -386,7 +386,7 @@ WECHAT_BASE_REDIRECT_URI = '{0}/we/base_redirect'.format(DOMAIN_HTTP) |
||
386 | 386 |
WECHAT_USERINFO_REDIRECT_URI = '{0}/we/userinfo_redirect'.format(DOMAIN_HTTP) |
387 | 387 |
|
388 | 388 |
# 消息图片设置 |
389 |
-PAI2_LOGO_URL = DOMAIN + '/static/pai2/img/paiai_96_96.png' |
|
389 |
+PAI2_LOGO_URL = DOMAIN + '/static/kodo/img/paiai_96_96.png' |
|
390 | 390 |
SYSTEM_MESSAGE_AVATAR = PAI2_LOGO_URL |
391 | 391 |
COMMENT_MESSAGE_AVATAR = PAI2_LOGO_URL |
392 | 392 |
THUMBUP_MESSAGE_AVATAR = PAI2_LOGO_URL |
@@ -395,7 +395,7 @@ THUMBUP_MESSAGE_AVATAR = PAI2_LOGO_URL |
||
395 | 395 |
REDIS_CACHE = connector(REDIS.get('default', {})) |
396 | 396 |
|
397 | 397 |
# Q_CLUSTER = { |
398 |
-# 'name': 'pai2', |
|
398 |
+# 'name': 'kodo', |
|
399 | 399 |
# 'workers': 8, |
400 | 400 |
# 'recycle': 500, |
401 | 401 |
# 'timeout': 60, |
@@ -411,7 +411,7 @@ DJLOGIT = { |
||
411 | 411 |
'level': 'DEBUG', |
412 | 412 |
'class': 'rlog.RedisListHandler', |
413 | 413 |
'redis_client': REDIS_CACHE, |
414 |
- 'key': 'django:logit:pai2', |
|
414 |
+ 'key': 'django:logit:kodo', |
|
415 | 415 |
'formatter': 'verbose', |
416 | 416 |
} |
417 | 417 |
|
@@ -1,6 +1,6 @@ |
||
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
|
3 |
-"""pai2 URL Configuration |
|
3 |
+"""kodo URL Configuration |
|
4 | 4 |
|
5 | 5 |
The `urlpatterns` list routes URLs to views. For more information please see: |
6 | 6 |
https://docs.djangoproject.com/en/1.8/topics/http/urls/ |
@@ -43,7 +43,7 @@ from website import views as website_views |
||
43 | 43 |
# router.register(r'photos', photo_views.PhotoInfoViewSet) |
44 | 44 |
|
45 | 45 |
urlpatterns = [ |
46 |
- url(r'^pai2admin/', include(admin.site.urls)), |
|
46 |
+ url(r'^kodoadmin/', include(admin.site.urls)), |
|
47 | 47 |
] |
48 | 48 |
|
49 | 49 |
# urlpatterns += [ |
@@ -72,7 +72,7 @@ urlpatterns = [ |
||
72 | 72 |
# ] |
73 | 73 |
# |
74 | 74 |
# urlpatterns += [ |
75 |
-# url(r'^$', website_views.pai2_home, name='pai2_home'), # 官网首页 |
|
75 |
+# url(r'^$', website_views.kodo_home, name='kodo_home'), # 官网首页 |
|
76 | 76 |
# ] |
77 | 77 |
|
78 | 78 |
# Mini App |
@@ -1,5 +1,5 @@ |
||
1 | 1 |
""" |
2 |
-WSGI config for pai2 project. |
|
2 |
+WSGI config for kodo project. |
|
3 | 3 |
|
4 | 4 |
It exposes the WSGI callable as a module-level variable named ``application``. |
5 | 5 |
|
@@ -12,6 +12,6 @@ import os |
||
12 | 12 |
from django.core.wsgi import get_wsgi_application |
13 | 13 |
|
14 | 14 |
|
15 |
-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pai2.settings") |
|
15 |
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "kodo.settings") |
|
16 | 16 |
|
17 | 17 |
application = get_wsgi_application() |
@@ -4,7 +4,7 @@ import sys |
||
4 | 4 |
|
5 | 5 |
|
6 | 6 |
if __name__ == "__main__": |
7 |
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pai2.settings") |
|
7 |
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "kodo.settings") |
|
8 | 8 |
|
9 | 9 |
from django.core.management import execute_from_command_line |
10 | 10 |
|
@@ -7,7 +7,7 @@ from django_models_ext import BaseModelMixin |
||
7 | 7 |
from TimeConvert import TimeConvert as tc |
8 | 8 |
|
9 | 9 |
from group.models import GroupPhotoInfo |
10 |
-from pai2.basemodels import PaiaiSrcMixin |
|
10 |
+from kodo.basemodels import PaiaiSrcMixin |
|
11 | 11 |
|
12 | 12 |
|
13 | 13 |
class UserMessageInfo(BaseModelMixin): |
@@ -4,7 +4,7 @@ from django.db import models |
||
4 | 4 |
from django.utils.translation import ugettext_lazy as _ |
5 | 5 |
from django_models_ext import BaseModelMixin, upload_file_url, upload_path |
6 | 6 |
|
7 |
-from pai2.basemodels import PaiaiSrcMixin, PlatformMixin, VersionMixin |
|
7 |
+from kodo.basemodels import PaiaiSrcMixin, PlatformMixin, VersionMixin |
|
8 | 8 |
|
9 | 9 |
|
10 | 10 |
class LatestAppInfo(BaseModelMixin, PaiaiSrcMixin): |
@@ -50,10 +50,10 @@ |
||
50 | 50 |
</div> |
51 | 51 |
|
52 | 52 |
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> |
53 |
- <script type="text/javascript" src="{% static 'pai2/js/jswe-0.0.4.js' %}"></script> |
|
53 |
+ <script type="text/javascript" src="{% static 'kodo/js/jswe-0.0.4.js' %}"></script> |
|
54 | 54 |
<script> |
55 | 55 |
V.initWxData({ |
56 |
- imgUrl: 'http://pai.ai/static/pai2/img/paiai_96_96.png', |
|
56 |
+ imgUrl: 'http://pai.ai/static/kodo/img/paiai_96_96.png', |
|
57 | 57 |
link: 'http://pai.ai/w/o?r=http%3A%2F%2Fkodo.xfoto.com.cn%2Fp%2Fclerk%2Finfo', |
58 | 58 |
desc: '店员授权', |
59 | 59 |
title: '店员授权', |
@@ -176,10 +176,10 @@ |
||
176 | 176 |
{% endif %} |
177 | 177 |
</script> |
178 | 178 |
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> |
179 |
- <script type="text/javascript" src="{% static 'pai2/js/jswe-0.0.4.js' %}"></script> |
|
179 |
+ <script type="text/javascript" src="{% static 'kodo/js/jswe-0.0.4.js' %}"></script> |
|
180 | 180 |
<script> |
181 | 181 |
V.initWxData({ |
182 |
- imgUrl: 'http://pai.ai/static/pai2/img/paiai_96_96.png', |
|
182 |
+ imgUrl: 'http://pai.ai/static/kodo/img/paiai_96_96.png', |
|
183 | 183 |
link: 'http://pai.ai/w/o?r=http%3A%2F%2Fkodo.xfoto.com.cn%2Fp%2Fclerk', |
184 | 184 |
desc: '店员授权', |
185 | 185 |
title: '店员授权', |
@@ -342,10 +342,10 @@ |
||
342 | 342 |
}); |
343 | 343 |
</script> |
344 | 344 |
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> |
345 |
- <script type="text/javascript" src="{% static 'pai2/js/jswe-0.0.4.js' %}"></script> |
|
345 |
+ <script type="text/javascript" src="{% static 'kodo/js/jswe-0.0.4.js' %}"></script> |
|
346 | 346 |
<script> |
347 | 347 |
V.initWxData({ |
348 |
- imgUrl: 'http://pai.ai/static/pai2/img/paiai_96_96.png', |
|
348 |
+ imgUrl: 'http://pai.ai/static/kodo/img/paiai_96_96.png', |
|
349 | 349 |
link: 'http://pai.ai/w/o?r=http%3A%2F%2Fkodo.xfoto.com.cn%2Fp%2Fclerk%2Fsale', |
350 | 350 |
desc: '店员授权', |
351 | 351 |
title: '店员授权', |
@@ -95,7 +95,7 @@ |
||
95 | 95 |
<div class="container" > |
96 | 96 |
<article class="text-center"> |
97 | 97 |
<a href="http://pai.ai"> |
98 |
- <img src="{% static 'pai2/img/paiai_96_96.png' %}" class="logo"> |
|
98 |
+ <img src="{% static 'kodo/img/paiai_96_96.png' %}" class="logo"> |
|
99 | 99 |
</a> |
100 | 100 |
<div class="title"> |
101 | 101 |
<a href="http://pai.ai" class="text-blue">拍爱</a> |
@@ -149,7 +149,7 @@ |
||
149 | 149 |
<div class="container"> |
150 | 150 |
<article class="text-center"> |
151 | 151 |
<a href="https://pai.ai"> |
152 |
- <img src="{% static 'pai2/img/paiai_96_96.png' %}" class="logo"> |
|
152 |
+ <img src="{% static 'kodo/img/paiai_96_96.png' %}" class="logo"> |
|
153 | 153 |
</a> |
154 | 154 |
<div class="title"> |
155 | 155 |
<a href="https://pai.ai" class="text-blue">拍爱</a> |
@@ -186,10 +186,10 @@ |
||
186 | 186 |
{% endif %} |
187 | 187 |
</script> |
188 | 188 |
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> |
189 |
- <script type="text/javascript" src="{% static 'pai2/js/jswe-0.0.4.js' %}"></script> |
|
189 |
+ <script type="text/javascript" src="{% static 'kodo/js/jswe-0.0.4.js' %}"></script> |
|
190 | 190 |
<script> |
191 | 191 |
V.initWxData({ |
192 |
- imgUrl: "http://pai.ai/static/pai2/img/paiai_96_96.png", |
|
192 |
+ imgUrl: "http://pai.ai/static/kodo/img/paiai_96_96.png", |
|
193 | 193 |
link: 'http://pai.ai/w/o?r=http%3A%2F%2Fpai.ai%2Fp%2Flensman', |
194 | 194 |
desc: "摄影师授权", |
195 | 195 |
title: "摄影师授权", |
@@ -32,7 +32,7 @@ |
||
32 | 32 |
</head> |
33 | 33 |
<body> |
34 | 34 |
<div class="container" > |
35 |
- <img id="qr_logo" class="hidden" src="{% static 'pai2/img/paiai_96_96.png' %}"> |
|
35 |
+ <img id="qr_logo" class="hidden" src="{% static 'kodo/img/paiai_96_96.png' %}"> |
|
36 | 36 |
<div id="qr" class="qr"></div> |
37 | 37 |
</div> |
38 | 38 |
|
@@ -47,10 +47,10 @@ |
||
47 | 47 |
}); |
48 | 48 |
</script> |
49 | 49 |
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> |
50 |
- <script type="text/javascript" src="{% static 'pai2/js/jswe-0.0.4.js' %}"></script> |
|
50 |
+ <script type="text/javascript" src="{% static 'kodo/js/jswe-0.0.4.js' %}"></script> |
|
51 | 51 |
<script> |
52 | 52 |
V.initWxData({ |
53 |
- imgUrl: "http://pai.ai/static/pai2/img/paiai_96_96.png", |
|
53 |
+ imgUrl: "http://pai.ai/static/kodo/img/paiai_96_96.png", |
|
54 | 54 |
link: 'http://pai.ai/w/o?r=http%3A%2F%2Fpai.ai%2Fp%2Floginqr', |
55 | 55 |
desc: "授权登录", |
56 | 56 |
title: "授权登录", |
@@ -152,7 +152,7 @@ |
||
152 | 152 |
|
153 | 153 |
<script type="text/javascript" src="//cdn.bootcss.com/zepto/1.1.6/zepto.min.js"></script> |
154 | 154 |
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> |
155 |
- <script type="text/javascript" src="{% static 'pai2/js/jswe-0.0.4.js' %}"></script> |
|
155 |
+ <script type="text/javascript" src="{% static 'kodo/js/jswe-0.0.4.js' %}"></script> |
|
156 | 156 |
<script> |
157 | 157 |
{% if modified %} |
158 | 158 |
$(function() { |
@@ -251,7 +251,7 @@ |
||
251 | 251 |
</script> |
252 | 252 |
<script> |
253 | 253 |
V.initWxData({ |
254 |
- imgUrl: "http://pai.ai/static/pai2/img/paiai_96_96.png", |
|
254 |
+ imgUrl: "http://pai.ai/static/kodo/img/paiai_96_96.png", |
|
255 | 255 |
link: 'http://pai.ai/w/o?r=http%3A%2F%2Fpai.ai%2Fp%2Ftourguide', |
256 | 256 |
desc: "导游授权", |
257 | 257 |
title: "导游授权", |
@@ -1,88 +0,0 @@ |
||
1 |
-# pai2_nginx.conf |
|
2 |
- |
|
3 |
-# the upstream component nginx needs to connect to |
|
4 |
-upstream pai2 { |
|
5 |
- # server unix:///home/paiai/work/pai2/pai2/uwsgi/pai2.sock; # for a file socket |
|
6 |
- server 127.0.0.1:8888; # for a web port socket (we'll use this first) |
|
7 |
-} |
|
8 |
- |
|
9 |
-# configuration of the server |
|
10 |
-server { |
|
11 |
- # the port your site will be served on |
|
12 |
- listen 80; |
|
13 |
- # the domain name it will serve for |
|
14 |
- server_name .img.pai.ai .img.xfoto.com.cn; # substitute your machine's IP address or FQDN |
|
15 |
- charset utf-8; |
|
16 |
- |
|
17 |
- # max upload size |
|
18 |
- client_max_body_size 75M; # adjust to taste |
|
19 |
- |
|
20 |
- # Django media |
|
21 |
- location / { |
|
22 |
- alias /home/paiai/work/pai2/media; # your Django project's media files - amend as required |
|
23 |
- } |
|
24 |
- |
|
25 |
- location /photo { |
|
26 |
- alias /home/paiai/work/pai2/media/photo; # your Django project's media files - amend as required |
|
27 |
- } |
|
28 |
- |
|
29 |
- location /fly { |
|
30 |
- alias /home/paiai/work/pai2/media/fly; # your Django project's media files - amend as required |
|
31 |
- } |
|
32 |
-} |
|
33 |
- |
|
34 |
-# configuration of the server |
|
35 |
-server { |
|
36 |
- # the port your site will be served on |
|
37 |
- listen 80; |
|
38 |
- # the domain name it will serve for |
|
39 |
- server_name .api.pai.ai .api.xfoto.com.cn; # substitute your machine's IP address or FQDN |
|
40 |
- charset utf-8; |
|
41 |
- |
|
42 |
- # max upload size |
|
43 |
- client_max_body_size 75M; # adjust to taste |
|
44 |
- |
|
45 |
- # Django media |
|
46 |
- location /media { |
|
47 |
- alias /home/paiai/work/pai2/media; # your Django project's media files - amend as required |
|
48 |
- } |
|
49 |
- |
|
50 |
- location /static { |
|
51 |
- alias /home/paiai/work/pai2/collect_static; # your Django project's static files - amend as required |
|
52 |
- } |
|
53 |
- |
|
54 |
- # Finally, send all non-media requests to the Django server. |
|
55 |
- location / { |
|
56 |
- # uwsgi_pass pai2; |
|
57 |
- proxy_pass http://pai2; |
|
58 |
- include /home/paiai/work/pai2/pai2/uwsgi/uwsgi_params; # the uwsgi_params file you installed |
|
59 |
- } |
|
60 |
-} |
|
61 |
- |
|
62 |
-# configuration of the server |
|
63 |
-server { |
|
64 |
- # the port your site will be served on |
|
65 |
- listen 80; |
|
66 |
- # the domain name it will serve for |
|
67 |
- server_name .pai.ai .xfoto.com.cn; # substitute your machine's IP address or FQDN |
|
68 |
- charset utf-8; |
|
69 |
- |
|
70 |
- # max upload size |
|
71 |
- client_max_body_size 75M; # adjust to taste |
|
72 |
- |
|
73 |
- # Django media |
|
74 |
- location /media { |
|
75 |
- alias /home/paiai/work/pai2/media; # your Django project's media files - amend as required |
|
76 |
- } |
|
77 |
- |
|
78 |
- location /static { |
|
79 |
- alias /home/paiai/work/pai2/collect_static; # your Django project's static files - amend as required |
|
80 |
- } |
|
81 |
- |
|
82 |
- # Finally, send all non-media requests to the Django server. |
|
83 |
- location / { |
|
84 |
- # uwsgi_pass pai2; |
|
85 |
- proxy_pass http://pai2; |
|
86 |
- include /home/paiai/work/pai2/pai2/uwsgi/uwsgi_params; # the uwsgi_params file you installed |
|
87 |
- } |
|
88 |
-} |
@@ -1,12 +0,0 @@ |
||
1 |
-[program:pai2] |
|
2 |
-command=/home/paiai/env/bin/uwsgi --ini /home/paiai/work/pai2/pai2/uwsgi/pai2.ini |
|
3 |
-autostart=true |
|
4 |
-autorestart=true |
|
5 |
-startretries=3 |
|
6 |
-exitcodes=0,1,2 |
|
7 |
-stopsignal=KILL |
|
8 |
-stopasgroup=true |
|
9 |
-killasgroup=true |
|
10 |
-stdout_logfile=/var/log/supervisor_pai2_access.log |
|
11 |
-stderr_logfile=/var/log/supervisor_pai2_error.log |
|
12 |
-user=paiai |
@@ -14,12 +14,12 @@ |
||
14 | 14 |
|
15 | 15 |
/* For Download Section */ |
16 | 16 |
.download_section {position:fixed;right:0;bottom:0;left:0;height:55px;padding:5px;background:#f0f0f0;box-sizing:border-box} |
17 |
- .pai2_icon {width:45px;height:45px;float:left} |
|
18 |
- .pai2_icon>img {width:100%;height:100%} |
|
19 |
- .pai2_desc {height:45px;padding:5px 0 0 5px;float:left} |
|
20 |
- .pai2_name {padding-top:2px;font-size:14px;text-align:left} |
|
21 |
- .pai2_des {padding-top:2px;font-size:12px;line-height:23px;color:#8f8f8f;text-align:left} |
|
22 |
- .pai2_download {position:relative;top:5px;width:100px;height:35px;line-height:35px;text-align:center;background:#d13621;color:#fff;border-radius:5px;float:right;text-decoration:none} |
|
17 |
+ .kodo_icon {width:45px;height:45px;float:left} |
|
18 |
+ .kodo_icon>img {width:100%;height:100%} |
|
19 |
+ .kodo_desc {height:45px;padding:5px 0 0 5px;float:left} |
|
20 |
+ .kodo_name {padding-top:2px;font-size:14px;text-align:left} |
|
21 |
+ .kodo_des {padding-top:2px;font-size:12px;line-height:23px;color:#8f8f8f;text-align:left} |
|
22 |
+ .kodo_download {position:relative;top:5px;width:100px;height:35px;line-height:35px;text-align:center;background:#d13621;color:#fff;border-radius:5px;float:right;text-decoration:none} |
|
23 | 23 |
/* For PC */ |
24 | 24 |
body, .download_section { |
25 | 25 |
max-width: 414px !important; |
@@ -35,22 +35,22 @@ |
||
35 | 35 |
</div> |
36 | 36 |
|
37 | 37 |
<div id="download_section" class="download_section"> |
38 |
- <div class="pai2_icon"> |
|
39 |
- <img src="{% static 'pai2/img/paiai_96_96.png' %}"> |
|
38 |
+ <div class="kodo_icon"> |
|
39 |
+ <img src="{% static 'kodo/img/paiai_96_96.png' %}"> |
|
40 | 40 |
</div> |
41 |
- <div class="pai2_desc"> |
|
42 |
- <div class="pai2_name">拍爱</div> |
|
43 |
- <div class="pai2_des">即拍即分享</div> |
|
41 |
+ <div class="kodo_desc"> |
|
42 |
+ <div class="kodo_name">拍爱</div> |
|
43 |
+ <div class="kodo_des">即拍即分享</div> |
|
44 | 44 |
</div> |
45 |
- <a href="https://api.pai.ai/op/download" target="_blank" id="pai2_download" class="pai2_download">立即下载</a> |
|
45 |
+ <a href="https://api.pai.ai/op/download" target="_blank" id="kodo_download" class="kodo_download">立即下载</a> |
|
46 | 46 |
</div> |
47 | 47 |
|
48 | 48 |
<script type="text/javascript" src="//cdn.bootcss.com/zepto/1.1.6/zepto.min.js"></script> |
49 | 49 |
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> |
50 |
- <script type="text/javascript" src="{% static 'pai2/js/jswe-0.0.4.js' %}"></script> |
|
50 |
+ <script type="text/javascript" src="{% static 'kodo/js/jswe-0.0.4.js' %}"></script> |
|
51 | 51 |
<script> |
52 | 52 |
V.initWxData({ |
53 |
- imgUrl: "http://pai.ai/static/pai2/img/paiai_96_96.png", |
|
53 |
+ imgUrl: "http://pai.ai/static/kodo/img/paiai_96_96.png", |
|
54 | 54 |
link: window.location.href, |
55 | 55 |
desc: "我使用拍爱分享了一张美图,你也快来试试吧", |
56 | 56 |
title: "拍爱", |
@@ -14,12 +14,12 @@ |
||
14 | 14 |
|
15 | 15 |
/* For Download Section */ |
16 | 16 |
.download_section {position:fixed;right:0;bottom:0;left:0;height:55px;padding:5px;background:#f0f0f0;box-sizing:border-box} |
17 |
- .pai2_icon {width:45px;height:45px;float:left} |
|
18 |
- .pai2_icon>img {width:100%;height:100%} |
|
19 |
- .pai2_desc {height:45px;padding:5px 0 0 5px;float:left} |
|
20 |
- .pai2_name {padding-top:2px;font-size:14px;text-align:left} |
|
21 |
- .pai2_des {padding-top:2px;font-size:12px;line-height:23px;color:#8f8f8f;text-align:left} |
|
22 |
- .pai2_download {position:relative;top:5px;width:100px;height:35px;line-height:35px;text-align:center;background:#d13621;color:#fff;border-radius:5px;float:right;text-decoration:none} |
|
17 |
+ .kodo_icon {width:45px;height:45px;float:left} |
|
18 |
+ .kodo_icon>img {width:100%;height:100%} |
|
19 |
+ .kodo_desc {height:45px;padding:5px 0 0 5px;float:left} |
|
20 |
+ .kodo_name {padding-top:2px;font-size:14px;text-align:left} |
|
21 |
+ .kodo_des {padding-top:2px;font-size:12px;line-height:23px;color:#8f8f8f;text-align:left} |
|
22 |
+ .kodo_download {position:relative;top:5px;width:100px;height:35px;line-height:35px;text-align:center;background:#d13621;color:#fff;border-radius:5px;float:right;text-decoration:none} |
|
23 | 23 |
/* For PC */ |
24 | 24 |
body, .download_section { |
25 | 25 |
max-width: 414px !important; |
@@ -37,22 +37,22 @@ |
||
37 | 37 |
</div> |
38 | 38 |
|
39 | 39 |
<div id="download_section" class="download_section"> |
40 |
- <div class="pai2_icon"> |
|
41 |
- <img src="{% static 'pai2/img/paiai_96_96.png' %}"> |
|
40 |
+ <div class="kodo_icon"> |
|
41 |
+ <img src="{% static 'kodo/img/paiai_96_96.png' %}"> |
|
42 | 42 |
</div> |
43 |
- <div class="pai2_desc"> |
|
44 |
- <div class="pai2_name">拍爱</div> |
|
45 |
- <div class="pai2_des">即拍即分享</div> |
|
43 |
+ <div class="kodo_desc"> |
|
44 |
+ <div class="kodo_name">拍爱</div> |
|
45 |
+ <div class="kodo_des">即拍即分享</div> |
|
46 | 46 |
</div> |
47 |
- <a href="https://api.pai.ai/op/download" target="_blank" id="pai2_download" class="pai2_download">立即下载</a> |
|
47 |
+ <a href="https://api.pai.ai/op/download" target="_blank" id="kodo_download" class="kodo_download">立即下载</a> |
|
48 | 48 |
</div> |
49 | 49 |
|
50 | 50 |
<script type="text/javascript" src="//cdn.bootcss.com/zepto/1.1.6/zepto.min.js"></script> |
51 | 51 |
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> |
52 |
- <script type="text/javascript" src="{% static 'pai2/js/jswe-0.0.4.js' %}"></script> |
|
52 |
+ <script type="text/javascript" src="{% static 'kodo/js/jswe-0.0.4.js' %}"></script> |
|
53 | 53 |
<script> |
54 | 54 |
V.initWxData({ |
55 |
- imgUrl: "http://pai.ai/static/pai2/img/paiai_96_96.png", |
|
55 |
+ imgUrl: "http://pai.ai/static/kodo/img/paiai_96_96.png", |
|
56 | 56 |
link: window.location.href, |
57 | 57 |
desc: "我使用拍爱分享了一张美图,你也快来试试吧", |
58 | 58 |
title: "拍爱", |
@@ -1,6 +1,6 @@ |
||
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
|
3 |
-from pai2.basemodels import PlatformMixin |
|
3 |
+from kodo.basemodels import PlatformMixin |
|
4 | 4 |
from utils.redis.connect import r |
5 | 5 |
from utils.redis.rkeys import APP_PATCH_INFO |
6 | 6 |
|
@@ -1,6 +1,6 @@ |
||
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
|
3 |
-from pai2.basemodels import PlatformMixin |
|
3 |
+from kodo.basemodels import PlatformMixin |
|
4 | 4 |
from utils.redis.connect import r |
5 | 5 |
from utils.redis.rkeys import APP_SETTINGS_INFO |
6 | 6 |
|
@@ -4,5 +4,5 @@ from django.conf import settings |
||
4 | 4 |
from django.shortcuts import redirect |
5 | 5 |
|
6 | 6 |
|
7 |
-def pai2_home(request): |
|
7 |
+def kodo_home(request): |
|
8 | 8 |
return redirect(settings.WEBSITE_MOBI if request.mobile else settings.WEBSITE_PC) |